#define _CRT_SECURE_NO_WARNINGS
#include"Stack.h"

void Stack::Init()
{
	_a = nullptr;
	_top = 0;
	_capacity = 0;
}
void Stack::push(int x)
{
	_a[_top++] = x;
}
Stack::~Stack()
{
	cout << "~Stack()" << endl;
	free(_a);
	_top = 0;
	_capacity = 0;
}